Control of low inventory alkylation unit

ABSTRACT

A method and system for controlling an HF alkylation system comprising a reactor, a settler, an HF acid regenerator and a source of fresh HF acid wherein a stream of olefins and a stream of isobutanes are contacted in the reactor in the presence an HF acid catalyst. At least the reactor feed is sampled, and the sample is passed to an analyzer using an attenuated total reflectance cell. Signals are generated which are representative of infrared spectra of the samples in a range providing information on the amount of at least one of HF, water, ASO and sulfolane. These signals are simultaneously determined and generated because all absorb in the same spectral region. This aspect provides for viewing these distortions of the main HF absorption band to quantify these three components. The infrared spectra signals are compared with stored signals to generate control signals; and at least one of HF, water and sulfolane fed to the reactor feed is adjusted in response to the control signal.

CROSS REFERENCE TO RELATED APPLICATION

This application is a continuation-in-part of U.S. patent applicationSer. No. 08/160,565, filed Dec. 1, 1993, now U.S. Pat. No. 5,407,830.U.S. patent application Ser. No. 08/160,565, filed Dec. 1, 1993 ishereby incorporated herein by reference.

BACKGROUND OF THE INVENTION

The present invention relates to a liquid acid catalyzed alkylationunit. More specifically, the present invention relates to the in situmeasurement and the control of a low inventory liquid acid catalyzedalkylation unit.

Alkylation is a reaction in which an alkyl group is added to an organicmolecule. Thus, an isoparaffin can be reacted with an olefin to providean isoparaffin of higher molecular weight. The process depends on thereaction of a C₂ to C₅ olefin with isobutane in the presence of anacidic catalyst producing an alkylate. This alkylate is a valuableblending component in the manufacture of gasolines due not only to itshigh octane rating but also its sensitivity to octane enhancingadditives.

U.S. Pat. No. 4,795,728 discloses a hydrofluoric acid (HF) catalyzedalkylation process for producing motor fuel. The hydrofluoric acidcatalyst complex contains from 0.5 to 5 weight percent of a cationic oranionic surfactant component enabling the process to be operated at anolefin acid volumetric feed ratio of greater than 1.0 while maintainingacceptable alkylate quality.

For a general discussion of sulfuric acid alkylation, see the series ofthree articles by L. F Albright et. al., "Alkylation of Isobutane withC₄ Olefins", 27 Ind. Eng. Chem. Res, pgs. 381-397 (1988). HF alkylationis described in further detail in the Handbook of Petroleum RefiningProcesses, pgs. 3-28 (1986).

Generally, in acid alkylation longer residence times for thehydrocarbon/acid contact are preferred. However, longer residence timesresult in reduced reactor capacity as well as increased operating costs.For a discussion of residence time see Albright, "Modern Alkylation",Oil and Gas Journal, p. 83, (Nov. 12, 1990).

Lewis acids are reducing acids having a high vapor pressure, and apropensity to flash into a cloud. Lewis acid catalyzed alkylationprocesses are also currently used to produce high octane blendingcomponents. Examples of Lewis acids include BF₃, AlCl₃ and SbF₃.

Liquid acid catalyzed continuous alkylation processes generally comprisea reactor, a settler where hydrocarbon droplets are separated from theacid and a heat exchanger where the heat generated by the exothermicreaction is removed. Each vessel requires a large liquid acid catalystinventory.

Both sulfuric acid and HF alkylation share inherent drawbacks includingenvironmental and safety concerns and acid consumption. While catalystcomplexes comprising BF₃ overcome some of the safety and environmentaldrawbacks of sulfuric acid and HF alkylation systems, the volume andquality of BF₃ alkylates have not, proven comparable to that of sulfuricor HF alkylates. Currently HF catalyzed alkylates processes are underparticular safety and environmental scrutiny, because of the toxic andcorrosive nature of HF.

U.S. Pat. Nos. 4,938,935 and 4,938,936 describe the danger of HF leaks.Through many safety precautions are taken to prevent leaks, massive orcatastrophic leaks are feared primarily because the anhydrous acid willfume on escape crating a vapor cloud that can be spread for somedistance.

It is therefore an object of the present invention to provide a methodand system for reducing the liquid acid catalyst inventory in acidcatalyzed continuous alkylation processes.

It is a further object to provide a method and system for improving thesafety of liquid acid catalyzed continuous alkylation.

It is a further object of the present invention to provide a method andsystem for minimizing the risk of a sudden release of toxic material.

SUMMARY OF THE INVENTION

The on-line analyzer of the present invention provides for fast andaccurate control of the potentially fast changing catalyst compositionin a low inventory HF alkylation process. The ability to provide rapidcorrective control of the catalyst composition in accordance with thepresent invention is essential to the use of a low inventory catalystsystem because without the buffer provided by a standard inventory thesystem is subject to large swings.

A significant aspect of the present invention is that HF, water andsulfolane are simultaneously determined because essentially all absorbin the same spectral region. Thus, the method and system provide forviewing these distortions of the main HF absorption band to quantifythese three components.

In accordance with a broad aspect of the present invention there isprovided a method of and system for controlling an HF alkylation systemcomprising a reactor, a settler, an HF acid regenerator and a source offresh HF acid. A stream of olefins and a stream of isobutanes arecontacted in the reactor in the presence an HF acid catalyst. Thereactor provides a combined hydrocarbon and HF acid output stream to thesettler wherein separation provides an alkylate laden hydrocarbonproduct stream and a separated HF acid stream. The product stream isfurther processed to remove non-alkylate components therefrom, and aminor portion of the separated HF acid stream is fed to the acidregenerator. A major portion of the separated HF acid stream is returnedto the reactor along with fresh HF acid from the acid source andregenerated HF acid from the regenerator. The invention includessampling at least the reactor acid feed stream, and passing the samplesto a analyzer using an attenuated total reflectance cell. Signals aregenerated representative of infrared spectra of the samples in a rangeproviding information on the amount of at least one of HF, water, ASO(acid soluble oils) and sulfolane being fed to the reactor. The infraredspectra signals are compared with stored signals to generate controlsignals and the HF, water, ASO and sulfolane in the reactor feed areadjusted in response to the control signals.

In accordance with a specific aspect of the invention, there is provideda method and system for controlling a low inventory alkylation unit bysampling at least the reactor feed and passing the samples to anattenuated total reflectance cell of an analyzer including aspectroscope, e.g. a fourier transform infrared spectrometer (FTIR). Thetemperature of the samples are regulated to that of calibration standardtemperature upon which a model was built. Signals are generated whichare representative of reference and measured spectra for at least one ofHF, water, ASO, and an additive, e.g. sulfolane, for reducing the vaporpressure of the HF acid. The spectra signals are processed to correctfor instrumental variation in accordance with:

    A.sub.corr =log.sub.10 {S.sub.o /S[R.sub.o /R]};

wherein

A_(corr) =corrected sample absorbance spectrum;

S=current sample single beam spectrum;

S_(o) =sample single beam spectrum obtained at time 0 with an emptycell;

R=current reference cell single beam spectrum; and

R_(o) =reference cell single beam spectrum obtained at time 0.

Then a derivative is generated of the corrected sample absorbancespectrum, and the derivative is normalized in accordance with: ##EQU1##wherein D_(norm) =normalized derivative spectral element; and

D_(i) =derivative spectral element.

Stored model vectors are multiplied by the normalized derivativespectral elements to obtain values indicative of amount of the monitoredat least one of water, ASO, HF, and additive. The values, which may bepercent of HF catalyst, are compared to reference values to obtaindifference signals, and the flow of the monitored at least one of water,ASO, HF, and additive is controlled in response to said differencesignals.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an on-line FTIC analyzer embodiment used inthe present invention;

FIG. 2 is a graph of the main absorption band used in the presentinvention;

FIG. 3 is a cross-sectional view of an attenuated total reflectance cellembodiment of the present invention;

FIG. 4 shows a sampling flow diagram interconnecting a reactor unit andFTIC in accordance with the present invention;

FIG. 5 is a control flow diagram for an HF alkylation unit in accordancewith the present invention; and

FIG. 6 is another embodiment of the invention for controlling an HFalkylation unit.

DESCRIPTION OF SPECIFIC EMBODIMENTS

Feedstocks useful in the present alkylation process include at least oneisoparaffin and at least one olefin. The isoparaffin reactant used inthe present alkylation process has from about 4 to about 8 carbon atoms.Representative examples of such isoparaffins include isobutane,3-methylhexane, 2 methyl butane, 2 methylhexane, 2,3-dimethylbutane and2,4-dimethylhexane.

The olefin component of the feedstock includes at least one olefinhaving from 2 to 12 carbon atoms. A few representative examples of sucholefins include butene-2, isobutylene, butene-1, propylene, ethylene,hexene, octene and heptene. The preferred olefins include the C₄olefins, for example, butene-1, butene-2, isobutylene, or a mixture ofone or more of these C₄ olefins, with butene-2 being the most preferred.Suitable feedstocks for the process of the present invention aredescribed in U.S. Pat. No. 3,862,258 the disclosure of which isincorporated herein by reference.

The molar ratio of isoparaffin to olefin is generally from about 1:1 toabout 100:1 preferably from about 1:1 to about 50:1, and more preferablyfrom about 5:1 to about 20:1.

The present alkylation process is suitably conducted at temperaturesfrom about -30° C. to about 200° C., preferably from about 0° C. toabout 100° C., and more preferably below about 50° C. to avoidundesirable side reactions. Lower reaction temperatures are preferred tomaximize alkylate octane. Lower temperatures are generally preferred,for example temperatures as low as 0° C. may be effectively employed.Operating temperature typically falls within the range of from about 0°C. to about 50° C., with the most preferred operating temperaturesfalling within the range of from about 20° C. to about 30° C.

Operating pressure is controlled to maintain the reactants in the liquidphase, and is suitably from about 50 psig to about 1500 psig.Preferably, the pressure is from about 75 psig to about 250 psig. Thecatalyst weight hourly space velocity as well as the acid dosage varieswith the particular acid catalyst system employed.

The particular operating conditions used in the present process willdepend on the specific alkylation reaction being effected. Processconditions such as temperature, pressure, space velocity and molar ratioof the reactants will affect the characteristics of the resultingalkylate, and may be adjusted within the disclosed ranges.

Thus, the reduction of HF inventory substantially enhances environmentalsafety. However, operation with low inventory requires a preparednessfor system upset with an ability to rapidly quantify direction and rateof upset and to quickly respond to offset the conditions causing theupset. Accordingly, operation of a standard HF alkylation unit with alow HF inventory requires a very rapid response system for controllinglow HF inventory systems as provided in accordance with the presentinvention. It is also essential to control the amount of water and theHF sulfolane content in a low HF inventory unit in order to preventcorrosion.

An advantage of the instant invention is that the system obviates theneed and the inherent risk of taking HF samples and bringing them backto a laboratory. Corrosion in an HF alkylation system is largely fromiron fluoride deposition and stress corrosion. HF attacks the slagformations in welds, and process vessels must therefore be stressrelieved. Also, any part of the system that is in direct contact with HFshould be made of monel metal or other corrosion resistant substance.

With reference to FIG. 1, there is shown an on-line FTIR analyzer forthe on-line prediction of HF, water, and sulfolane in a low inventory HFalkylation catalyst system. This analyzer satisfies the need generatedby lower inventory HF alkylation with a rapid, continuous method ofanalyzing HF, water, and sulfolane to control the process. The systemprovides these measurements with spectroscopic on-line HF catalystcomposition analysis.

Sapphire in the cell 14 is the optical internal reflectance element(IRE) in contact with the HF catalyst. Sapphire was found to be anacceptable material due to its corrosion resistance. Sapphire isoptically useful from the UV to IR. A thermo-electrically (TE) cooledlead selenide (PbSe) detector is used because its responsivity matchesthe transmission of sapphire in terms of low wave number cutoff, andbecause it is about 4 times more sensitive than a TE cooled deuteratedtriglycine sulfate (DTGS) detector in this region.

Standard sample preparation consisted of weighing appropriate amounts ofwater, sulfolane, and acid soluble oils (ASO--from a refinery) into a150 cc Monel bomb 10. A valve was then attached to the bomb for HFaddition. A measuring tube constructed from Monel and equipped with aTeflon sight tube was filled with HF to a needed height from an invertedNo. 4 HF (for liquid HF transfer) cylinder. The HF was then injectedinto the bomb 10. The overall mass of the solution was prepared to beabout 130 g and was accurately determined by weighing the bomb after HFaddition. The contents of the bomb were introduced into the sample loopby inverting the bomb 10 and allowing the contents to flow into anevacuated circulation loop defined by valve 16 holding vessel 12, pump13, sample cell 14. The solution was then circulated at a rate of 0.5gpm in a temperature controlled (73° F.) loop containing the sapphirecell 14. In an effort to simulate anticipated conditions of the unitcatalyst, the solution in the loop was equilibrated with isobutane froma source 15 at 25 psig for 15 minutes before the start of spectralacquisition. Acquisition of the sample spectrum and the reference cellspectrum consisted of coadding 64 scans at 8 cm⁻¹ resolution andutilizing the 4100 to 2100 cm⁻¹ region.

Two light pipes 5,6 interconnect the FTIR analyzer 7 with a pair ofmirrors 8,9. The light pipes are purged to exclude water vapor andcarbon dioxide. Infrared (IR) light from the FTIR 7 passes down one ofthe light pipes 5 to a multiplexing mirror 8. The mirror moves into andout of the IR beam. When in the beam of light, the mirror diverts thebeam of light into a reference cell 11. The beam exits the referencecell 11, and is again diverted by another multiplexing mirror 9 into thelight pipe 6 and back to the detector portion of the FTIR 7 where thelight signal is converted into an electrical signal. When the mirrors8,9 are not in the beam of IR light, the light passes to another mirror4 where it is diverted into the sample cell 14, out of the cell 14 anddiverted by yet another mirror 3 to return by light pipe 6 to the FTIR 6where at least one sample signal is generated. The sample cell 14 isshown in greater detail in FIG. 3.

With reference to FIG. 2, the main absorption band in the region between4100 and 2100 cm⁻¹ is due to HF. Water and sulfolane modify theabsorption spectrum of HF and they form a wide HF-water-sulfolanepolymer band at lower wave numbers. ASO in samples could be analyzed byuse of the C-H absorption bands around 3000 cm⁻¹. However, bothsulfolane and isobutane also have C-H absorption bands around 3000 cm⁻¹which may interfere with a possible ASO determination.

A calibration set was prepared using statistical experimental design.The set covers catalyst composition containing 100 to 50% HF, 0 to 10%water, 0 to 50% sulfolane, and 0 to 10% ASO. This set which consists of70 standards includes anticipated catalyst compositions.

The calibration model was created in array basic with the aid of LabCalc PLS (partial least squares) algorithm manufactured by GalacticIndustries Corp. A computer program listing for MHF-Continuous RefineryAcid Prediction Program is in an appendix to this specification.

The raw single beam spectra of the sample was first corrected forinstrumental variations alone as shown in Equation 1.

    A.sub.corr =log.sub.10 {S.sub.o /S[R.sub.o /R]};           [Eq. 1]

wherein

A_(corr) =corrected sample absorbance spectrum;

S=current sample single beam spectrum;

S_(o) =sample single beam spectrum obtained at time 0 with an emptycell;

R=current reference cell single beam spectrum; and

R_(o) =reference cell single beam spectrum obtained at time 0.

Correction for the ATR crystal transmission variation as a function oftime is not needed because no changes in the ATR crystal transmissionwere observed over a period of a few months. The first derivative ofcorrected absorption spectrum was then obtained with a 13 pointSavisky-Golay smoothing function. The first derivative and smoothingeliminated baseline shifts and very low frequency variations. Thederivative spectrum between 3950 and 2250 cm⁻¹ was then normalized byEquation 2 to correct for variations in absorption intensity. ##EQU2##wherein D_(norm) =normalized derivative spectral element; and

D_(i) =derivative spectral element.

Variations in the intensity are due to changes in the penetration of theIR beam into the solution due to changes in refractive index caused bythe addition of sulfolane and ASO. Addition of sulfolane and ASO greatlymodify the refractive index of HF/water. In addition, the chemicalinteraction of HF with water as well as sulfolane is strongly dependenton temperature. Therefore, the model includes temperature dependence.Spectral normalization reduces the standard error of prediction (SEP) bya factor of 15% and the calibration model is less susceptible totemperature variations.

Partial least squares and principal component regression (PCR) methodswere used to build calibration models using different bands of thespectra. Limited region models were evaluated utilizing the band between3950 and 3000 cm⁻¹ to predict HF, water, and sulfolane. Another modelwas evaluated utilizing the band between 3000 and 2800 cm⁻¹ to predictsulfolane and ASO, and the region between 2800 and 2200 cm⁻¹ wasevaluated for water prediction. The best overall model was achieved byusing the whole range between 3950 and 2250 cm⁻¹.

The PLS method was found to be superior to the PCR method in terms ofSEP (by a factor of 100%). This might be explained by the fact PCR isbetter able to model partially nonlinear calibration sets. Thenonlinearity is due to large changes in penetration depth of theevanescent IR wave resulting from variations in the refractive index ofvarying concentrations. The normalization function of Equation 2 is arectangular function.

Although 70 calibration spectra were obtain over a span of three months,the long term stability of the model as well as the cell were evaluatedby continuously circulating a standard over a period of 45 hours andpredicting the composition every fifteen minutes as it would be done inthe field. It appears that the actual spectra of the solution changes asa function of time (HF and water prediction decreases and sulfolaneprediction increases) and then reaches a steady state condition afterabout ten hours on stream. This effect may be explained as corrosion ofthe loop, or that isobutane saturation is slower than first believed, orpossible protonation and subsequent addition of water to ASO.

Calibration and prediction of ASO was attempted, but since the sulfolaneand isobutane C-H bands overlap with the ASO C-H bands, error in ASOprediction was too large to be useful (ASO prediction RMS error of 1.3%with samples containing 0 to 10% ASO). The errors in ASO prediction aredue to many factors including errors in the composition of standards dueto preparation and carry over in the circulation loop, nonlinearity ofthe measurement due to changes in refractive index of the solution, anderrors inherent using the ATR method itself.

Comparisons of characteristics of the samples with those of previoussamples from the same location are made to determine significant trendsor abnormal conditions. By comparing current trends of the samplesagainst these reference trend values, abnormal trends can be detectedand corrective action can be taken.

The system is able to measure the effects of small percentage amounts ofwater in the spectra of the sampled stream. This measurement is made byidentifying small differences in spectra which corresponds to smallwater changes. Thus, the system is able to reproducibly determine smallamounts of water. Monitoring and controlling water in the system iscritical, because too much water will stop the process, and too littlewater will cause serve corrosion of carbon steel.

The normal IR sampling method using transmission through thin films (onthe order of a few microns) would pose great difficulty and problemswith the alkylation catalysts because corrosion particles would clot orplug the system. An attenuated total reflectance (ATR) cell as shown inFIG. 3 was chosen to overcome sampling problems. In an ATR cell, thelight reflected back from the internal surface of the crystalestablishes a standing wave at the surface of the crystal into the phasein contact with the crystal. The amplitude of the electric field of thestanding wave decreases exponentially with distance from the surface ofthe crystal. The distance where the field amplitude equals 1/e (e=2.718)of the initial magnitude is defined as the penetration depth or samplingdistance. The overall sampling depth depends on the wavelength, therefractive index of crystal as well as the sample, light incidenceangle, and the number of reflections. ATR measurements are sensitive todegradation of and deposit formation on the crystal surface. Therefore,the crystal surface should be regularly cleaned, for example daily, byflushing with HF.

With reference to FIG. 3, the IR beam of light passes through a lightpipe portion 20, through a sapphire window 21 and is focused into themirror in a secondary containment area 22. The light then enters asapphire rod 23 where the light passes through internal reflections. Thelight exits through another secondary containment area 24, anothersapphire window 25, down a light pipe 25 and returns to the FTIR 7 asdescribed with reference to FIG. 1. A sample enters the cell 14 througha line 26, and into an annular sample area 27 formed between thesapphire rod 23 and the Monel cell housing 28, and exits the cellthrough a line 29. A portion of the IR light enters the sample area 27and interacts with the sample therein to give a light signalrepresentative of absorption.

Each of the secondary containment areas 22,24 is in fluid communicationwith an O-ring 30,31 such that in the event of a leak through an O-ring30, 31 the leak would be confined to one of the secondary containmentareas. Further, a signal representative of such leak would be given by achange in the IR beam. Another leak signal would also be given by apressure switch 30,31 which is responsive to an increase in pressure ina respective containment area 22,24.

The method and system of the present invention provides an analyzer formeasurement of the composition of the acid, and controlling the amountof fresh acid and/or the amount of water brought to the unit. Also, themeasurements permit the reduction of feedback from the regenerator sothat it is possible to enhance the removal and disposed of ASO. Thus,the analyzer will provide a continuing capacity to adjust thecomposition of the catalyst to permit operation in an optimum operatingregion. Such close control of the acid composition will avoid thepossibility of runaway condition, minimize the possibility of corrosionin the unit, and ease compliance with requirements to use an amount ofadditive, such as sulfolane, to reduce the vapor pressure of the acid.

With reference to FIG. 4, a slip-stream sampling loop is formed about amain catalyst pump 56 in an alkylation unit. Starting with the pump 56the sampling loop includes a valve 82, a line 83 to a sample cell 54where there are two manually operable valves 110, 41 to open the loopwhen needed. The loop also includes a line 85 to a valve 86, then a line87 to a manual sample acquisition unit 88 and then back to the intake ofthe pump 56. The manual sampling acquisition unit 88 permits manuallysampling of the catalyst which is analyzed manually and checked versusthe response of the on-line analyzer.

The system also includes a pump 89, a line 90 and the line 87 to providea bypass loop of the cell 54 when in a bypass mode. The sampling loopalso includes a needle valve 91 to adjust the flow of the catalystthrough the sampling loop.

The system includes a FTIR spectrometer 84 such as a Spectra-TechApplied Systems MonitIR. The system also includes a reference cell 92which is not connected to the sampling system, but is provided forcomparison and corrections for variations of the FTIR instrument. TheFTIR and cells are connected and function as described hereinabove withreference to FIGS. 1 and 3.

A bath 94 is provided which functions as a temperature control unit. Thebath 94 has insulated lines 95,96 extending through the jacket of thecell 54, to regulate the temperature of cell body. Purge line 97,98 areprovided to remove water vapor and carbon dioxide from the light pipeconnecting the FTIR to the sample cell 54. The system also includes atemperature probe or transducer, and a pressure sensor. The cell 54 hasa secondary barrier to indicate leaks from the main barrier, andincludes a pressure switch.

Further, there is provision to isolate the sampling loop and drain outthe acid through a valve 100. Thus, when there is need to service theline, the acid can be drained. A vacuum line is connected to the valves101 (marked with a asterisk) to evacuate the remaining acid. There isalso a provision via line 103 to introduce 100% anhydrous acid to washout the cell 54 which travels from an anhydrous HF tank to the cell 54and back through valve 86 and into the main pump 56. As a safetyprovision, there is also provided on the line a rupture disk 104 set atabout 300 pounds, which is connected to a relief valve 105 connected toa line 106 for full evacuation of the acid. The cell is tested at about500 pounds, and then there is provided a safety rupture disk 104 that isset at 300 pounds to prevent any major upsets, destruction of the cell,or release to the atmosphere.

With reference to FIG. 5 there is shown an HF alkylation catalystcontrol flow diagram of an embodiment of the present invention. Olefinfeed is passed by a pump 35 to a mixer 36 where hydrogen is added to thefeed prior to introduction to a hydrotreater 37. The hydrotreater 37converts diolefins or dienes to single double bonds. A dryer 38 isprovided to remove any excess water provided with the feed over whichthe system would have no control, and which might present a potentialupset. A bypass line 33 having a control valve 34 response to the watercontrol signal bypasses the dryer 38, and thereby provides a capacity toincrease the water content. After the dryer 38 the olefin feed is passedby a pump 39 through a control valve 40, and into a riser reactor 41.This feed is also mixed with a source of isobutane provided by a line 42entering through pump 43 and a control valve 44. Valves 40 and 44 adjustthe isobutane to olefin ratio to provide an optimum mixture ofreactants.

A pump 45 feeds isobutane recovered via line 48 from an alkylationaccumulator unit 47. Thus, feed excess isobutane that was recovered bythe accumulator 47 is fed back through a control valve 46. The reactantsenter the riser reactor 41 and the acid catalyst enters the reactor 41through a main catalyst pump 56 and a control valve 48. From the riserreactor 42, the reactants, the products and the catalyst are passed by aline 49 to an acid settler 60 where the acid is removed from the lightends and hydrocarbons. The output from the acid settler 60 goes toalkylate accumulator 47 which separates alkylate from excess isobutane.The alkylate is passed by a line 50, to a caustic wash (not shown) andthen to an alkylate accumulation tank (not shown). The excess isobutaneis fed back by a line 48 into the reactor 41. The acid settler 60settles the acid, and the accumulated acid is pumped back to the reactor41 through pump 56.

The system includes a source of 100% anhydrous HF which is fed through apump 51 and control valve 52. A 3-way valve 53 provides switchingbetween feeding the HF to the acid settler 60 or to wash the cell 54. AnHF washing of the cell once a day is adequate to minimize build up of acoating on the optical elements. Thus, cleaning would be a dailymaintenance operation.

The acid settler 60 has a feed of water to control the water levelthrough a pump 55 and control valve 68. There is also provided a sourceof sulfolane which is fed through a pump 75 and a control valve 71 intothe acid settler 60. Basically the acid settler 70 is a unit for mixingall of the components of the catalyst in a proper mixture, and theoutput of the acid settler goes through the pump 56 and the on-lineanalyzer 54 to analyze the catalyst composition and send out appropriatecontrol signals to various valves to automatically adjust thecomposition of the catalyst and maintain it at optimum level.

FIG. 5 also shows an HF catalyst regeneration section in accordance withthe present invention. Part of the output of a pump 56 is fed into anacid stripper 58 through a valve 57. The acid stripper 58 removes the HFfrom the ASO, sulfolane and water. The removed HF is pumped back to theacid settler 60 by a pump 61 and a valve 62. The bottoms of the acidstripper 58, which is mainly sulfolane, ASO and some water, is passedthrough a control valve 63 into a sulfolane/ASO separator 64. Since ASOhas a density less than sulfolane, ASO is removed from the top of theseparator 64 and passed by a line 65 to an ASO disposal. The bottoms ofthe ASO/sulfolane separator 64, which is mainly sulfolane, is fed backthrough a pump 66 and a control valve 67 into the mixing area 68 of theacid settler 60.

The signals from the analyzer which control the catalyst composition arethe signal for water adjustment which regulates a control valve 68 tocontrol the water level introduced into the acid settler 60 from asource of water. The HF signal from the analyzer controls valves 69, 70which control the amount or level of HF in the acid settler 60. Thevalve 69 controls HF flow through a pump 71 from a source of 100% HFacid, and the valve 70 controls flow from the stripper 58. Signals fromthe analyzer 54 control sulfolane flow to the settler 60 through a valve71 from a sulfolane source, and through the valve 67 from the separator64. Analyzer ASO control signals adjust the ASO control valve 57 toregulate the amount of ASO.

The three components, HF, sulfolane and water basically are absorbed thesame area of the infrared. One inventive aspect of the present inventionis that peak heights or peak areas are not measured independently.Distortions of the main peak which is mostly due to HF are measured. TheHF absorbs in the 3500-3600 wave number area in the infrared, as well aswater and sulfolane. Water broadens the peak shape of the HF and thusessentially distorts the absorption shape of the HF in the spectrum.This distortion includes a polymer area downfield in the 2400 wavenumber region where HF/water combinations are found. Sulfolane alsodistorts the HF peak, and the invention provides for evaluating thedistortions of the HF peak to determine the content of water andsulfolane.

Basically the changes in the HF peak are determined by the dataprocessing scheme which is the PLS or PCR. The PLS or PCR reduces thedimensionality of the signal and finds the differences or changes thatoccur so the comparison to the standards are simplified by thismathematical operation. Through the PLS and PCR the distortions in thepeak are readily detected and are calculated by multiplying the spectrumthrough the vectors that developed by the model.

With reference to FIG. 6, there is shown a schematic flow diagram of anembodiment of a computer 150 for controlling the HF alkylation unit ofFIG. 1. The computer 150 receives data signals representing IR valuesfor at least one, and preferably all, of HF, water, ASO and sulfolane ineach monitored stream, for example at any number of point A, B, C and D.For example the FIG. 5 embodiment monitored the feed to the reactor. Thecomputer 150 compares the received data and the results of analysis ofthe data against limits, reference values and trends, and generatescontrol signals to correct any variation or drift from desired values.If a dangerous condition exists, the computer provides an alarm signal.Normally, alarm signals would be generated only if an emergencycondition exists.

The IR data signals representative of HF, water, ASO and sulfolane fromthe sampling points are fed to the computer 150 via an interface 151.The interface 151 supplies digital signals to data validity testroutines 60,61,62,63 located in the computer 150. The test routines60-63 check the validity of the data relating to the HF, water, ASO andsulfolane of the monitored stream by confirming the data format and/orthe nature of the data itself to determine whether or not valid data isbeing supplied by the interface 151. The outputs from the data validitytest routines 60-63 are each coupled to a respective comparator 64-67,wherein the data is compared with limit, and trend reference valves todetermine if an abnormal condition exists. The data is also comparedwith previous data on samples taken from the same monitoring or samplingpoint to determine if any trends are developing. The limit, trend andreference values are maintained in a storage component 68, and are fedto the comparators 64-67. If an abnormal trend or condition is detectedby any one of the comparators 64-67 which indicates a dangerouscondition in the process or at the location where the sample wasextracted, an alarm signal is fed to an emergency condition alarm 70 vialines 71-74, respectively.

The outputs of the comparators 64-67 are fed to the storage component 68wherein the results of the analysis are stored with the results ofprevious samples from the same location. The outputs of comparators64-67 are also fed to a correlator 75 which compares variouscombinations of the results of the comparisons performed in thecomparators 64-67 with trend and reference information stored in thestorage component 68. The correlator 75 provides the results of thecorrelation of data to a coder 76. The correlator 75 also determines ifany trends are developing and if any combination of conditions existingin the engine indicate a dangerous condition. If a dangerous trend orcondition is detected, the correlator 75 provides an output signal tothe emergency condition alarm 70 via a line 77, and the alarm 70generates an alarm signal to alert the system operator of the dangerouscondition.

Alternatively, the validity routines 60-63 may be replaced with oneroutine, and the comparators 64-67 could be replaced with a singlecomparator. The information from each signal generator 7-10 can then besequentially fed through a single high speed circuit.

The outputs of the correlator 75 and the output of the comparators 64-67are sent to a coding routine 76 wherein the outputs of the correlator 75and comparators 64-67 are coded into control codes and other quantitiesrelating to HF, water, ASO and/or sulfolane. The output of the coder 76sends control signals to various locations of the process of FIG. 5 tocorrect undesired trends and values, for example to control valves E, F,G and H, e.g. values 68, 69, 70, 71 and 57 of FIG. 5. The operation ofthe computer 150 may be under control of a timing device 78 whichcontrols the transfer of information between the various portionsthereof. The validity test routines 60-63 may include comparison devicesto check whether or not the input data falls within a predeterminedrange or ranges, and circuitry to determine whether the format of thedata itself (that is, whether the data word supplied by the interface151 is of the right length, includes proper codes, etc.). The comparatorcircuits 64-67 include routines to compare data from the validity testroutines 60-63 with reference, trend and limit data stored in thestorage component 68. The comparators 64-67 also include circuitry fordetecting emergency conditions. The emergency detecting circuits withinthe comparators 63-65 may comprise a decoding circuit, such as a matrixwhich is responsive to predetermined data configurations indicative ofemergency conditions.

The correlator 75 includes comparison circuits for comparing variouscombinations of inputs from the comparators 64-67 with reference trendand limit data from the storage component 68. The correlator 75 also mayinclude a decoding circuit for detecting predetermined dataconfigurations which indicate emergency conditions and for feeding anappropriate signal to the alarm 70. The coder 76 receives inputinformation relating to the monitored variables HF, water, ASO and/orsulfolane, and combines such information. The coder 76 detects theexistence of various conditions and of various predeterminedcombinations of conditions, and provides coded data control signalswhich are fed to the controlled HF alkylation process of FIG. 5. Thecoder 76 may include a matrix type of coder which provides variousoutput signals in response to predetermined individual input signals andto predetermined combinations of input signals.

While the invention has been described in conjunction with specificembodiments thereof, it is evident that many alternatives,modifications, and variations will be apparent to those skilled in theart in light of the foregoing description. Accordingly, it is intendedto embrace all such alternatives, modification, and variations as fallwithin the spirit and broad scope of the appended claims. ##SPC1##

What is claimed is:
 1. A method of controlling the composition of an HFacid catalyst in a reactor of an HF alkylation system wherein said HFacid catalyst includes HF, water, ASO and an additive for reducing thevapor pressure of said HF acid catalyst, said method comprising thesteps of:(a) obtaining a sample from a stream of said HF acid catalyst;(b) passing said sample to an analyzer including an attenuated totalreflectance cell; (c) regulating temperature of said sample to that of acalibration standard temperature; (d) generating signals representativeof reference and measured spectra for at least said HF, said water andsaid additive in said sample; (e) processing said spectra signals tocorrect for instrumental variation in accordance with:

    A.sub.corr =log.sub.10 {S.sub.o /S[R.sub.o /R]};

wherein A_(corr) =corrected sample absorbance spectrum; S=current samplesingle beam spectrum; S_(o) =sample single beam spectrum obtained attime 0 with an empty cell; R=current reference cell single beamspectrum; and R_(o) =reference cell single beam spectrum obtained attime 0 (f) generating a derivative of said corrected sample absorbancespectrum; (g) normalizing said derivative in accordance with; ##EQU3##wherein D_(norm) =normalized derivative spectral element; D_(i)=derivative spectral element; and 410- 210= spectral region, cm⁻¹ ; (h)multiplying stored model vectors by spectral elements of said normalizedderivative to obtain values indicative of the amount of said HF, saidwater and said additive in said sample; (i) comparing said values toreference values to obtain differences, and (j) controlling the relativeamounts of said HF, said water and said additive in said stream of saidHF acid catalyst in response to said differences to provide apredetermined HF acid composition in said reactor; and wherein steps (d)through (h) are performed on a computer with a computer program.
 2. Themethod of claim 1 wherein said additive is sulfolane.
 3. The method ofclaim 1 wherein steps (a) and (b) are performed automatically.
 4. Themethod of claim 2 wherein in step (i) said values are compared toreference values to obtain difference signals, and wherein in step (j)the relative amounts of said HF, said water and said sulfolane in saidstream of said HF acid catalyst are automatically controlled in responseto said difference signals to provide the predetermined HF acidcomposition in said reactor.
 5. The method of claim 4 wherein step (d)includes generating signals representative of reference and measuredspectra for ASO in said HF acid catalyst, and wherein said ASO signalsare processed in accordance with steps (e) through (i).
 6. The method ofclaim 2 wherein in step (g) said derivative is normalized in accordancewith: ##EQU4## wherein D_(norm) =normalized derivative spectral element;andD_(i) =derivative spectral element.
 7. The method of claim 1 whereinstep (f) further comprises smoothing said derivative spectrum, wherebystep (f) eliminates baseline shifts and low frequency variations.
 8. Themethod of claim 1 wherein said measured spectra in step (d) is in theinfrared range.
 9. The method of claim 1 wherein each of the measuredspectra signals generated in step (d) are in a spectral region.
 10. Themethod of claim 4 wherein said HF alkylation system further includes anacid settler, an HF acid regenerator, a source of fresh HF acid and asource of water, wherein a stream of olefins and a stream of isobutanesare contacted in said reactor in the presence said HF acid catalyst,said reactor providing a combined hydrocarbon and HF acid output streamto said settler wherein separation provides an alkylate ladenhydrocarbon product stream and a separated HF acid stream, and a minorportion of said separated HF acid stream is fed to said acid regeneratorand a major portion of said separated HF acid stream is returned to saidreactor along with fresh HF acid from said acid source and regeneratedHF acid from said regenerator; and wherein in response to step (j):saidHF difference signal controls the flow rate of said fresh acid from saidfresh acid source to said settler, and/or the flow rate of regeneratedHF acid from said regenerator to said settler; said water differencesignal controls the flow of water from said water source to saidsettler; and said sulfolane difference signal controls the flow ofsulfolane from said sulfolane source to said settler, and/or from saidacid regenerator to said settler.
 11. The method of claim 10 whereinstep (d) includes generating signals representative of reference andmeasured spectra for ASO in said HF acid catalyst, and wherein said ASOsignals are processed in accordance with steps (e) through (i).
 12. Themethod of claim 1 wherein steps (i) and (j) are performed on thecomputer with a program.
 13. A system for controlling the composition ofan HF acid catalyst in a reactor of an HF alkylation system wherein saidHF acid catalyst includes HF, water, ASO and an additive for reducingthe vapor pressure of said HF acid catalyst, said system comprising:(a)means for obtaining a sample from a stream of said HF acid catalyst; (b)means for passing said sample to an analyzer including an attenuatedtotal reflectance cell; (c) means for regulating temperature of saidsample to that of a calibration standard temperature; (d) a computer,and program means on said computer for generating signals representativeof reference and measured spectra for at least said HF, said water andsaid additive in said sample; (e) program means on said computer forprocessing said spectra signals to correct for instrumental variation inaccordance with:

    A.sub.corr =log.sub.10 {S.sub.o /S[R.sub.o /R]};

wherein A_(corr) =corrected sample absorbance spectrum; S=current samplesingle beam spectrum; S_(o) =sample single beam spectrum obtained attime 0 with an empty cell; R=current reference cell single beamspectrum; and R_(o) =reference cell single beam spectrum obtained attime 0 (f) program means on said computer for generating a derivative ofsaid corrected sample absorbance spectrum; (g) program means on saidcomputer for normalizing said derivative; in accordance with; ##EQU5##wherein D_(norm) =normalized derivative spectral element; D_(i)=derivative spectral element; and 410- 210= spectral region, cm⁻¹ ; (h)program means on said computer for multiplying stored model vectors byspectral elements or said normalized derivative to obtain valuesindicative of the amount of said HF, said water and said additive insaid sample; (i) program means on said computer for comparing saidvalues to reference values to obtain difference signals, and (j) meansfor controlling the relative amounts of said HF, said water and saidadditive in said stream of said HF acid catalyst in response to saiddifference signals to provide a predetermined HF acid composition insaid reactor.
 14. The system of claim 13 wherein said signal generatingprogram means includes program means for generating signalsrepresentative of reference and measured spectra for ASO in said HF acidcatalyst, and wherein said ASO signals are processed by the means (e)through (i).
 15. The system of claim 13 wherein the additive issulfolane and wherein said derivative normalizing program meansnormalizes said derivative in accordance with: ##EQU6## wherein D_(norm)=normalized derivative spectral element; andD_(i) =derivative spectralelement.
 16. The system of claim 13 wherein said derivative generatingprogram means further comprises program means for smoothing saidderivative spectrum, whereby baseline shifts and low frequencyvariations are eliminated.
 17. The system of claim 13 wherein saidmeasured spectra is in the infrared range.
 18. The system of claim 13wherein each of said spectra signals are in the same spectral region.19. The system of claim 18 wherein the controlling means (j) includesprogram means on the computer.